package cn.yuanqiao.archive.appManager.service;

import cn.yuanqiao.archive.appManager.domain.TenantFields;
import cn.yuanqiao.archive.appManager.domain.TenantMdataList;
import cn.yuanqiao.archive.appManager.domain.TenantRelevance;
import com.alibaba.fastjson2.JSONObject;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * 元数据明细Service接口
 *
 * @author yuanqiao
 * @date 2023-06-09
 */
public interface ITenantCateMdataListService
{
    /**
     * 查询元数据明细
     *
     * @param id 元数据明细主键
     * @return 元数据明细
     */
    public TenantMdataList selectYqdaMdataListById(Long id);

    public List<TenantMdataList> getFileNumberField(Long categoryId);


    Map<String,Object> selectYqdaMdataListByIdAll(Long id);


    /**
     * 查询元数据明细列表
     *
     * @param yqdaMdataList 元数据明细
     * @return 元数据明细集合
     */
    public List<TenantMdataList> selectYqdaMdataListList(TenantMdataList yqdaMdataList);

    /**
     * 新增元数据明细
     * @return 结果
     */
    //public int insertYqdaMdataList(HddaMDataList yqdaMdataList);
    public int insertYqdaMdataList(String ids, Long categoryId,Integer type) throws SQLException;

    /**
     * 修改元数据明细
     *
     * @param yqdaMdataList 元数据明细
     * @return 结果
     */
    public int updateYqdaMdataList(TenantMdataList yqdaMdataList,String ids);

    /**
     * 批量删除元数据明细
     *
     * @param ids 需要删除的元数据明细主键集合
     * @return 结果
     */
    public int deleteYqdaMdataListByIds(Long[] ids,Long categoryId,Integer type) throws SQLException;

    /**
     * 删除元数据明细信息
     *
     * @param id 元数据明细主键
     * @return 结果
     */
    public int deleteYqdaMdataListById(Long id);

    List<TenantFields> getGroupDataList(TenantFields yqfields, Long groupId);

    String copyIsRepeat(String ids, Long groupId, Integer type);

    int copyToGroup(String ids, Long groupId, Integer type);

    void importHddaMDataList(List<TenantMdataList> dataLists, Long groupId, Integer type);

    List<Map<String, String>> getshowfield(JSONObject json);

    List<Map<String, String>> getqueryfield(Long categoryId, Long menuId, Integer type);

    List<Map<String, String>> getexportfield(Long categoryId, Long menuId, Integer type);

    String getorder(Long categoryId, Long menuId, Integer type);

    Map<String, Object> getaddfield(Long categoryId, Long menuId, Integer type);

    Map<String, Object> getupdatefield(Long categoryId, Long menuId, Integer type);

    List<TenantRelevance> getrelevancelist(JSONObject json);

    List<Map<String, Object>> getrelevancefield(JSONObject json);

    int addrelevance(JSONObject json);

    TenantRelevance getreledetail(Long id);

    int editrele(TenantRelevance relevance);

    int delterele(JSONObject json);

    List<Map<String, Object>> getrelevanceforadd(JSONObject json);

    int batchUpdateYqdaMdataList(TenantMdataList yqdaMdataList, String ids);

    boolean moveDown(Long metadataListIds, Long groupId, Long categoryId, Integer type);

    boolean moveUp(Long metadataListIds, Long groupId, Long categoryId, Integer type);}
